package cn.kduck.module.message.service;

/**
 *
 * 发送邮件。
 * 示例（邮件正文中包含一张倩如图片，同时附加两个附件）：
 * <pre>
 *     MailMessage mailMessage = new MailMessage();
 *     mailMessage.setFromUserName("刘海刚");
 *     mailMessage.setTo("lhg317@163.com");
 *     mailMessage.setSubject("头像&照片");
 *
 *     String cid = UUID.randomUUID().toString();
 *     mailMessage.setContent("&lt;html&gt;&lt;body&gt;邮件正文中的内嵌图片：&lt;p&gt;&lt;img src='cid:"+ cid + "'&gt;&lt;/body&gt;&lt;/html&gt;");
 *     mailMessage.addInline(cid,new File("D:\\User\\Pictures\\head.jpg"));
 *
 *     mailMessage.addAttachment(new File("E:\\attachment\\file.doc"));
 *     mailMessage.addAttachment(new File("E:\\attachment\\img.JPG"));
 *     mailMessageService.sendMail(mailMessage);
 *
 * </pre>
 */
public interface MailMessageService {

    /**
     * 发送邮件
     * @param mailMessage 邮件参数对象
     */
    void sendMail(MailMessage mailMessage);

}
